using System;
using System.ComponentModel.DataAnnotations;

namespace Com.Modules.SimplifyModule.Dtos.Example;

public class SaveExampleRequest
{
    [Range(0, int.MaxValue, ErrorMessage = "示例ID不能为负数")]
    public int Id { get; set; }
    
    [Required(ErrorMessage = "示例编码不能为空")]
    [MaxLength(50, ErrorMessage = "示例编码不能超过50个字符")]
    public string Code { get; set; } = string.Empty;
    
    [Required(ErrorMessage = "示例名称不能为空")]
    [MaxLength(100, ErrorMessage = "示例名称不能超过100个字符")]
    public string Name { get; set; } = string.Empty;
}

